#include <iostream>
#include <string>
using namespace std;

class FullName {
public:
	FullName(string firtName, string lastName)
		: firtName(firtName), lastName(lastName) {	}
	friend istream & operator>>(istream & in, FullName & fullName);
	void print() {
		cout << firtName << " " << lastName << endl;
	}

private:
	string firtName;
	string lastName;
};


int main() {
	FullName fullName("Alan", "Tang");
	fullName.print();

	cin >> fullName;
	fullName.print();
	return 0;
}

istream & operator>>(istream & in, FullName & fullName) {
	in >> fullName.firtName >> fullName.lastName;
	return in;
}
